{% extends 'base.html' %}
<h1>文章详情页面</h1>
{% block content %}

<div class="breadcrumb">您的位置：<a itemprop="breadcrumb" href="{% url 'index' %}">首页</a> >
    <a href="{% url 'index' %}list-{{show.category.id}}.html">{{show.category.name}}</a>>
    <span class="current">正文</span>
</div>

{% comment %}
文章标题
{% endcomment %}

<h1 class='post-title'>{{show.title}}</h1>

<div>
    {{show.body|safe}}
</div>


<span class="item">分类：<a href="{% url 'index' %}list-{{show.category.id}}.html" rel="category tag">{{show.category.name}}</a></span>
<span class="item">    作者：{{ show.user }}</span>
<span class="item">   浏览：{{ show.views }}</span>
<span class="item">  {{ show.created_time }}</span>
<div class="post-tag"><span class='fa fa-tags' aria-hidden='true'></span>标签：
    {% for tag in show.tags.all %}
    <a href="{% url 'index' %}tag/{{tag.name}}" ref="tag">{{tag.name}}</a>
    {% endfor %}
</div>

{% comment %}
是否有上下文章
{% endcomment %}

<div>
    <b>上一篇</b>
    {% if next_blog %}
    <a href="show-{{next_blog.pk}}.html" class="article-tag">{{next_blog}}</a>
    {% else %}
    没有了
    {% endif %}
</div>
{% endblock content %}